// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file SDPltPoseMsg.cpp
 * This source file contains the definition of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifdef _WIN32
// Remove linker warning LNK4221 on Visual Studio
namespace {
char dummy;
}  // namespace
#endif  // _WIN32

#include "SDPltPoseMsg.h"
#include <fastcdr/Cdr.h>

#include <fastcdr/exceptions/BadParamException.h>
using namespace eprosima::fastcdr::exception;

#include <utility>

SDPltPoseMsg::SDPltPoseMsg()
{
    // m_seq_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@4e718207
    m_seq_ = 0;
    // m_frame_id_ com.eprosima.idl.parser.typecode.StringTypeCode@1d371b2d
    m_frame_id_ ="";
    // m_xPoint_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@543c6f6d
    m_xPoint_ = 0.0;
    // m_yPoint_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@13eb8acf
    m_yPoint_ = 0.0;
    // m_zPoint_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@51c8530f
    m_zPoint_ = 0.0;
    // m_xOrientation_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@7403c468
    m_xOrientation_ = 0.0;
    // m_yOrientation_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@43738a82
    m_yOrientation_ = 0.0;
    // m_zOrientation_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@75881071
    m_zOrientation_ = 0.0;
    // m_wOrientation_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@2a70a3d8
    m_wOrientation_ = 0.0;

}

SDPltPoseMsg::~SDPltPoseMsg()
{









}

SDPltPoseMsg::SDPltPoseMsg(
        const SDPltPoseMsg& x)
{
    m_seq_ = x.m_seq_;
    m_frame_id_ = x.m_frame_id_;
    m_xPoint_ = x.m_xPoint_;
    m_yPoint_ = x.m_yPoint_;
    m_zPoint_ = x.m_zPoint_;
    m_xOrientation_ = x.m_xOrientation_;
    m_yOrientation_ = x.m_yOrientation_;
    m_zOrientation_ = x.m_zOrientation_;
    m_wOrientation_ = x.m_wOrientation_;
}

SDPltPoseMsg::SDPltPoseMsg(
        SDPltPoseMsg&& x)
{
    m_seq_ = x.m_seq_;
    m_frame_id_ = std::move(x.m_frame_id_);
    m_xPoint_ = x.m_xPoint_;
    m_yPoint_ = x.m_yPoint_;
    m_zPoint_ = x.m_zPoint_;
    m_xOrientation_ = x.m_xOrientation_;
    m_yOrientation_ = x.m_yOrientation_;
    m_zOrientation_ = x.m_zOrientation_;
    m_wOrientation_ = x.m_wOrientation_;
}

SDPltPoseMsg& SDPltPoseMsg::operator =(
        const SDPltPoseMsg& x)
{

    m_seq_ = x.m_seq_;
    m_frame_id_ = x.m_frame_id_;
    m_xPoint_ = x.m_xPoint_;
    m_yPoint_ = x.m_yPoint_;
    m_zPoint_ = x.m_zPoint_;
    m_xOrientation_ = x.m_xOrientation_;
    m_yOrientation_ = x.m_yOrientation_;
    m_zOrientation_ = x.m_zOrientation_;
    m_wOrientation_ = x.m_wOrientation_;

    return *this;
}

SDPltPoseMsg& SDPltPoseMsg::operator =(
        SDPltPoseMsg&& x)
{

    m_seq_ = x.m_seq_;
    m_frame_id_ = std::move(x.m_frame_id_);
    m_xPoint_ = x.m_xPoint_;
    m_yPoint_ = x.m_yPoint_;
    m_zPoint_ = x.m_zPoint_;
    m_xOrientation_ = x.m_xOrientation_;
    m_yOrientation_ = x.m_yOrientation_;
    m_zOrientation_ = x.m_zOrientation_;
    m_wOrientation_ = x.m_wOrientation_;

    return *this;
}

size_t SDPltPoseMsg::getMaxCdrSerializedSize(
        size_t current_alignment)
{
    size_t initial_alignment = current_alignment;


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + 255 + 1;

    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);



    return current_alignment - initial_alignment;
}

size_t SDPltPoseMsg::getCdrSerializedSize(
        const SDPltPoseMsg& data,
        size_t current_alignment)
{
    (void)data;
    size_t initial_alignment = current_alignment;


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.frame_id_().size() + 1;

    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);



    return current_alignment - initial_alignment;
}

void SDPltPoseMsg::serialize(
        eprosima::fastcdr::Cdr& scdr) const
{

    scdr << m_seq_;
    scdr << m_frame_id_;
    scdr << m_xPoint_;
    scdr << m_yPoint_;
    scdr << m_zPoint_;
    scdr << m_xOrientation_;
    scdr << m_yOrientation_;
    scdr << m_zOrientation_;
    scdr << m_wOrientation_;

}

void SDPltPoseMsg::deserialize(
        eprosima::fastcdr::Cdr& dcdr)
{

    dcdr >> m_seq_;
    dcdr >> m_frame_id_;
    dcdr >> m_xPoint_;
    dcdr >> m_yPoint_;
    dcdr >> m_zPoint_;
    dcdr >> m_xOrientation_;
    dcdr >> m_yOrientation_;
    dcdr >> m_zOrientation_;
    dcdr >> m_wOrientation_;
}

/*!
 * @brief This function sets a value in member seq_
 * @param _seq_ New value for member seq_
 */
void SDPltPoseMsg::seq_(
        uint32_t _seq_)
{
    m_seq_ = _seq_;
}

/*!
 * @brief This function returns the value of member seq_
 * @return Value of member seq_
 */
uint32_t SDPltPoseMsg::seq_() const
{
    return m_seq_;
}

/*!
 * @brief This function returns a reference to member seq_
 * @return Reference to member seq_
 */
uint32_t& SDPltPoseMsg::seq_()
{
    return m_seq_;
}

/*!
 * @brief This function copies the value in member frame_id_
 * @param _frame_id_ New value to be copied in member frame_id_
 */
void SDPltPoseMsg::frame_id_(
        const std::string& _frame_id_)
{
    m_frame_id_ = _frame_id_;
}

/*!
 * @brief This function moves the value in member frame_id_
 * @param _frame_id_ New value to be moved in member frame_id_
 */
void SDPltPoseMsg::frame_id_(
        std::string&& _frame_id_)
{
    m_frame_id_ = std::move(_frame_id_);
}

/*!
 * @brief This function returns a constant reference to member frame_id_
 * @return Constant reference to member frame_id_
 */
const std::string& SDPltPoseMsg::frame_id_() const
{
    return m_frame_id_;
}

/*!
 * @brief This function returns a reference to member frame_id_
 * @return Reference to member frame_id_
 */
std::string& SDPltPoseMsg::frame_id_()
{
    return m_frame_id_;
}
/*!
 * @brief This function sets a value in member xPoint_
 * @param _xPoint_ New value for member xPoint_
 */
void SDPltPoseMsg::xPoint_(
        double _xPoint_)
{
    m_xPoint_ = _xPoint_;
}

/*!
 * @brief This function returns the value of member xPoint_
 * @return Value of member xPoint_
 */
double SDPltPoseMsg::xPoint_() const
{
    return m_xPoint_;
}

/*!
 * @brief This function returns a reference to member xPoint_
 * @return Reference to member xPoint_
 */
double& SDPltPoseMsg::xPoint_()
{
    return m_xPoint_;
}

/*!
 * @brief This function sets a value in member yPoint_
 * @param _yPoint_ New value for member yPoint_
 */
void SDPltPoseMsg::yPoint_(
        double _yPoint_)
{
    m_yPoint_ = _yPoint_;
}

/*!
 * @brief This function returns the value of member yPoint_
 * @return Value of member yPoint_
 */
double SDPltPoseMsg::yPoint_() const
{
    return m_yPoint_;
}

/*!
 * @brief This function returns a reference to member yPoint_
 * @return Reference to member yPoint_
 */
double& SDPltPoseMsg::yPoint_()
{
    return m_yPoint_;
}

/*!
 * @brief This function sets a value in member zPoint_
 * @param _zPoint_ New value for member zPoint_
 */
void SDPltPoseMsg::zPoint_(
        double _zPoint_)
{
    m_zPoint_ = _zPoint_;
}

/*!
 * @brief This function returns the value of member zPoint_
 * @return Value of member zPoint_
 */
double SDPltPoseMsg::zPoint_() const
{
    return m_zPoint_;
}

/*!
 * @brief This function returns a reference to member zPoint_
 * @return Reference to member zPoint_
 */
double& SDPltPoseMsg::zPoint_()
{
    return m_zPoint_;
}

/*!
 * @brief This function sets a value in member xOrientation_
 * @param _xOrientation_ New value for member xOrientation_
 */
void SDPltPoseMsg::xOrientation_(
        double _xOrientation_)
{
    m_xOrientation_ = _xOrientation_;
}

/*!
 * @brief This function returns the value of member xOrientation_
 * @return Value of member xOrientation_
 */
double SDPltPoseMsg::xOrientation_() const
{
    return m_xOrientation_;
}

/*!
 * @brief This function returns a reference to member xOrientation_
 * @return Reference to member xOrientation_
 */
double& SDPltPoseMsg::xOrientation_()
{
    return m_xOrientation_;
}

/*!
 * @brief This function sets a value in member yOrientation_
 * @param _yOrientation_ New value for member yOrientation_
 */
void SDPltPoseMsg::yOrientation_(
        double _yOrientation_)
{
    m_yOrientation_ = _yOrientation_;
}

/*!
 * @brief This function returns the value of member yOrientation_
 * @return Value of member yOrientation_
 */
double SDPltPoseMsg::yOrientation_() const
{
    return m_yOrientation_;
}

/*!
 * @brief This function returns a reference to member yOrientation_
 * @return Reference to member yOrientation_
 */
double& SDPltPoseMsg::yOrientation_()
{
    return m_yOrientation_;
}

/*!
 * @brief This function sets a value in member zOrientation_
 * @param _zOrientation_ New value for member zOrientation_
 */
void SDPltPoseMsg::zOrientation_(
        double _zOrientation_)
{
    m_zOrientation_ = _zOrientation_;
}

/*!
 * @brief This function returns the value of member zOrientation_
 * @return Value of member zOrientation_
 */
double SDPltPoseMsg::zOrientation_() const
{
    return m_zOrientation_;
}

/*!
 * @brief This function returns a reference to member zOrientation_
 * @return Reference to member zOrientation_
 */
double& SDPltPoseMsg::zOrientation_()
{
    return m_zOrientation_;
}

/*!
 * @brief This function sets a value in member wOrientation_
 * @param _wOrientation_ New value for member wOrientation_
 */
void SDPltPoseMsg::wOrientation_(
        double _wOrientation_)
{
    m_wOrientation_ = _wOrientation_;
}

/*!
 * @brief This function returns the value of member wOrientation_
 * @return Value of member wOrientation_
 */
double SDPltPoseMsg::wOrientation_() const
{
    return m_wOrientation_;
}

/*!
 * @brief This function returns a reference to member wOrientation_
 * @return Reference to member wOrientation_
 */
double& SDPltPoseMsg::wOrientation_()
{
    return m_wOrientation_;
}


size_t SDPltPoseMsg::getKeyMaxCdrSerializedSize(
        size_t current_alignment)
{
    size_t current_align = current_alignment;












    return current_align;
}

bool SDPltPoseMsg::isKeyDefined()
{
    return false;
}

void SDPltPoseMsg::serializeKey(
        eprosima::fastcdr::Cdr& scdr) const
{
    (void) scdr;
             
}
